#include <iostream>
#include <vector>
#include <string>

int main() {
    std::string input;
    std::cin >> input;
    std::vector<char> a(input.begin(), input.end());
    bool d = true;
    for (size_t i = 0; i < a.size(); i += 7) {
        if (i + 1 < a.size()) {
            int diff = static_cast<int>(a[i + 1]) - static_cast<int>(a[i]);
            if (diff == 1 || diff == 2 || diff == 52 || diff == -52 || diff == 32 || diff == -51 || diff == 84 || diff == -83 || diff == -32) {
                continue;
            } else {
                d = false;
                break;
            }
        }
    }
    if (d) {
        std::cout << "True" << std::endl;
    } else {
        std::cout << "False" << std::endl;
    }
    return 0;
}
